<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../../config.inc.php");

session_start();
$_LangPath = "operate3d";
$strTemplatePath = __Admintemplate_Path."/Operate3D/";
include_once(__Language_Path."/selectlanguage_admin.php");
include_once(__Modules_Path."/LogRecord.lib.php");
include_once(__Modules_Path."/Gamble.lib.php");
include_once(__Common_Path."/SysParam.inc.php");
include_once(__Modules_Path."/ChangeTime.lib.php");
include_once(__Common_Path."/Lotto.inc.php");

$arrPower = CheckUsePower("operate3d");
if($arrPower === false)ErrMsgOutputHTML("Error", "", 1);


$isShowAVOdds = (preg_match("/avodds/", $arrPower[1]))?"Y":"";

if(empty($_SESSION["Admin_Info"] -> GameType))$_SESSION["Admin_Info"] -> GameType = $_KSysParam[GamblePreLine];
if($_data["ChangeGameType"] == "Yes"){
	$_SESSION["Admin_Info"] -> GameType = $_data["GameType"];
}
$_data["GameType"] = $_SESSION["Admin_Info"] -> GameType;

$intLID = (int)$_data["LottoID"];
if(empty($intLID))$intLID = 2;	// 暫訂只有 中國體彩
$arrLotto = $_arrLotto[$intLID];
$intLType = (int)$arrLotto["LType"];

$data = $_data["data"];
switch($_data["op"]){
	case "OddsUpdate":		//更改賠率
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Odds.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLID.".inc.php");
		include_once("OddsUpdate.php");
		include_once("GetOdds.php");
		break;

	case "MultiOddsUpdate"://批次更改賠率
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Odds.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLID.".inc.php");
		include_once("MultiOddsUpdate.php");
		include_once("GetOdds.php");
		break;

	case "GetOdds":				//抓取賠率
		include_once(__Admin_Path."/logincheck.php");
		@include_once(__Common_Path."/Emergency.inc.php");
		include_once(__Common_Path."/gambletype/GambleType".$_data["GameType"]."_".$intLID.".inc.php");
		include_once("GetOdds.php");
		break;

	case "StopBet":				//停押
		include_once(__Admin_Path."/logincheck.php");
		include_once("StopBet.php");
		include_once(__Common_Path."/gambletype/GambleType".$_data["GameType"]."_".$intLID.".inc.php");
		include_once("GetOdds.php");
		break;


	case "OffAllWager":			//緊急停止下注
		include_once("OffAllWager.php");
		break;

	default:								//顯示操盤表
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Lotto.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLID.".inc.php");
		include_once("List.php");
		break;
}
@mysql_close($$_Conn);
?>